const app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    detail: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getOrderDetail(options.orderId);
  },

  getOrderDetail(orderId) {
    let url = '/order/detail?orderId=' + orderId;
    app.get(url).then(res=> {
      console.log(res);
      this.setData({
        detail: res.result
      })
    })
  } 
})